<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
import { setLocalToken } from '@/utils/token'
export default {
  mounted () {
    window.onbeforeunload = () => {
      // console.log(this.searchHistory)
      setLocalToken(
        'searchHistory',
        JSON.stringify(this.$store.state.searchHistory)
      )
    }
  }
}
</script>

<style></style>
